import frida
import sys

rdev = frida.get_remote_device()
session = rdev.attach("京东")

scr = """
Java.perform(function () {
        var SubmitOrderProductInfo = Java.use("com.jingdong.common.entity.cart.SubmitOrderProductInfo");
        SubmitOrderProductInfo.implementation = function(){
        console.log("-----------------------");
        var res = this.SubmitOrderProductInfo()
        console.log("res:",res);
        return res
    }
});
"""
script = session.create_script(scr)


def on_message(message, data):
    print(message, data)


script.on("message", on_message)

script.load()
sys.stdin.read()
